{php include wl_template('common/header');}
<style type='text/css'>
	.goods-info{position:relative;padding-left:60px;}
	.goods-info .img{position:absolute;top:50%;margin-top:-25px;background: url({IMAGE_LOADING}) center center no-repeat;width:50px;height:50px;}
	.goods-info span{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: block;}
	.goods-info .all-tips{margin-left: 65px;}
</style>
<ul class="nav nav-tabs" id="myTab">
	<li class="active"><a href="#">外链特权</a></li>
</ul>
<div class="app-content">
	<div class="app-filter">
		<div class="filter-action">
			<a href="{php echo web_url('halfcard/externallink/createhalfcard')}" class="btn btn-primary">添加特权</a>
		</div>
		<div class="filter-list">
			<form action="" method="get" class="form-horizontal" role="form" id="form1">
				<input type="hidden" name="c" value="site" />
				<input type="hidden" name="a" value="entry" />
				<input type="hidden" name="m" value="{MODULE_NAME}" />
				<input type="hidden" name="p" value="halfcard" />
				<input type="hidden" name="ac" value="externallink" />
				<input type="hidden" name="do" value="halflists" />
				<input type="hidden" name="status" value="{$_GPC['status']}" />
				<div class="form-group">
					<label class="col-sm-2 control-label">特权状态</label>
					<div class="col-sm-9">
						<div class="btn-group">
							<a href="{php echo wl_filter_url('status:0');}" class="btn {if intval($_GPC['status']) == 0}btn-primary{else}btn-default{/if}">不限</a>
							<a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == 1}btn-primary{else}btn-default{/if}">启用中</a>
							<a href="{php echo wl_filter_url('status:4');}" class="btn {if $_GPC['status'] == 4}btn-primary{else}btn-default{/if}">未启用</a>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">特权标题</label>
                    <div class="col-md-4">
                        <input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}"  placeholder="请输入关键字"/>
                    </div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-9">
						<button class="btn btn-primary" id="search">筛选</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="app-table-list">
		<div class="panel-body table-responsive collapse in" id="order-template-item-4" style="padding: 0;">
			<table class="table table-bordered table-hover">
				<thead style="background-color: #FFFFFF;">
				<tr>
					<th style="width:190px;text-align:center;">特权信息</th>
					<th style="width:150px; text-align:center;">限制简介</th>
					<th style="width:120px; text-align: center;">属性</th>
					<th style="width:90px; text-align: center;">折扣</th>
					<th style="width:150px;text-align:center;">活动时间</th>
					<th style="width:90px; text-align: center;">状态</th>
					<th style="width:150px; text-align:center;">操作</th>
				</tr>
				</thead>
				<tbody >
				{loop $halflist $y $item}
				<tr>
					<td class="goods-info line-feed" style="width:190px;padding-left: 10px;">
						<div class="img"><img src="{IMAGE_PIXEL}" class="scrollLoading" data-url="{php echo tomedia($item['logo'])}" height="50" width="50" ></div>
						<div class="all-tips">
							<span class="" style="font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif ;">
							<a style="color: #428bca;" data-href="{php echo web_url('halfcard/externallink/changehalf',array('id' => $item['id'],'type'=>1))}" href="javascript:;" title="修改活动名" data-toggle="ajaxEdit" >{$item['title']}</a>
							<p style="margin: 0;">{$item['storename']}</p>
							</span>
						</div>
					</td>
					<td class="text-center" style="width:150px;height:60px;font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif ;">
					<a style="color: #428bca;" data-href="{php echo web_url('halfcard/externallink/changehalf',array('id' => $item['id'],'type'=>5))}" href="javascript:;" title="修改简介" data-toggle="ajaxEdit" >{$item['limit']}</a>
					</td>
					<td class="text-center" style="width:120px;">
						<p style="margin: 0;">人气:<a style="color: #428bca;" data-href="{php echo web_url('halfcard/externallink/changehalf',array('id' => $item['id'],'type'=>2))}" href="javascript:;" title="修改人气" data-toggle="ajaxEdit" >{$item['pv']}</a></p>
						<p style="margin: 0;">排序:<a style="color: #428bca;" data-href="{php echo web_url('halfcard/externallink/changehalf',array('id' => $item['id'],'type'=>3))}" href="javascript:;" title="修改排序" data-toggle="ajaxEdit" >{$item['sort']}</a></p>
					</td>
					<td class="text-center" style="width:90px;">
						<span class="label label-info">{$item['activediscount']}折</span>
					</td>
					<td class="text-center" style="width:150px;">
						{if $item['timingstatus']}
						<span>开始：{$item['starttime']}</span><br/>
						<span>结束：{$item['endtime']}</span>
						{else}
						<p>无期限</p>
						{/if}
					</td>
					<td class="text-center" style="width:90px;">
						{if $item['status']==1}<span  class="label label-success">已启用</span>{/if}
						{if $item['status']==0}<span  class="label label-default">已禁用</span>{/if}
					</td>
					<td class="text-center" style="width:150px;">
						<a href="{php echo web_url('halfcard/externallink/createhalfcard', array('id' => $item['id']))}" class="js-edit" order-id="{$item['id']}"> 编辑 -</a>
						<a data-toggle="ajaxRemove" href="{php echo web_url('halfcard/externallink/changehalf',array('id' => $item['id'],'type'=>4))}" data-confirm="确认删除此活动？">删除</a>
					</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$("#search").click(function(){
		$('#form1')[0].submit();
	});
</script>
{php include wl_template('common/footer');}